<template>
    <div>{{ date }}</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const formatDate = () => {
  var dt = new Date();
  var fullYear = dt.getFullYear();
  var month = dt.getMonth() + 1 > 9 ? dt.getMonth() + 1 : '0' + (dt.getMonth() + 1);
  var day = dt.getDate() > 9 ? dt.getDate() : '0' + dt.getDate();

  return `${fullYear}-${month}-${day}`;
}

const date = ref(formatDate());
</script>